<html>
<head><meta charset="utf-8"><title>reviewer wanted for abi aggregates PR · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html">reviewer wanted for abi aggregates PR</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="156392165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156392165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156392165">(Jan 18 2019 at 19:12)</a>:</h4>
<p>So I put <span class="user-mention" data-user-id="126804">@Ariel Ben-Yehuda</span> as reviewer for <a href="https://github.com/rust-lang/rust/pull/57645" target="_blank" title="https://github.com/rust-lang/rust/pull/57645">https://github.com/rust-lang/rust/pull/57645</a>, but I'm not sure if they're super busy or what. I was wondering if <span class="user-mention" data-user-id="123586">@nagisa</span> you might want to review it?</p>



<a name="156395689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156395689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156395689">(Jan 18 2019 at 20:04)</a>:</h4>
<p>while I do have a fairly extensive knowledge of ARM/AARCH ABIs, I have no idea how they ought to behave in presence of ZSTs and I haven’t been following the issue too closely.</p>



<a name="156395975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156395975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156395975">(Jan 18 2019 at 20:09)</a>:</h4>
<p>Hmm. I wonder who might be good. <span class="user-mention" data-user-id="124289">@rkruppe</span> or <span class="user-mention" data-user-id="133224">@Nikita Popov</span>, perhaps? =)</p>



<a name="156395984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156395984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156395984">(Jan 18 2019 at 20:09)</a>:</h4>
<p>tbh I don't claim a <em>deep</em> knowledge, I'm kind of going on what arielb1 wrote + a dash of "instinct"</p>



<a name="156395990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156395990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156395990">(Jan 18 2019 at 20:09)</a>:</h4>
<p>though the rules seem to make logical sense, which might be a red flag <span class="emoji emoji-1f6a9" title="triangular flag">:triangular_flag:</span></p>



<a name="156396049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156396049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156396049">(Jan 18 2019 at 20:10)</a>:</h4>
<p>i.e., it seems like variable-length arrays <em>ought</em> to disable the homogeneous aggregate check, since they indicate data that you can't "see"</p>



<a name="156396073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156396073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156396073">(Jan 18 2019 at 20:11)</a>:</h4>
<blockquote>
<p>tbh I don't claim a <em>deep</em> knowledge, I'm kind of going on what arielb1 wrote + a dash of "instinct"</p>
</blockquote>
<p>that said, I did add explicit tests for a variety of cases where we are matching the (experimentally detected) behavior on clang</p>



<a name="156396076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156396076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156396076">(Jan 18 2019 at 20:11)</a>:</h4>
<p>so at least from a certain "black box" perspective, seems good</p>



<a name="156642379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156642379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156642379">(Jan 22 2019 at 21:42)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> thanks for the review BTW.</p>



<a name="156642390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156642390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156642390">(Jan 22 2019 at 21:42)</a>:</h4>
<p>or at least "once over"</p>



<a name="156642529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156642529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156642529">(Jan 22 2019 at 21:44)</a>:</h4>
<p>Curious to get feedback on <a href="https://github.com/rust-lang/rust/issues/56877#issuecomment-456436520" target="_blank" title="https://github.com/rust-lang/rust/issues/56877#issuecomment-456436520">this comment</a>.</p>



<a name="156642730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156642730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156642730">(Jan 22 2019 at 21:47)</a>:</h4>
<blockquote>
<p>Curious to get feedback on <a href="https://github.com/rust-lang/rust/issues/56877#issuecomment-456436520" target="_blank" title="https://github.com/rust-lang/rust/issues/56877#issuecomment-456436520">this comment</a>.</p>
</blockquote>
<p>I think we should just deal with pantomdata for now and leave arrays for another day</p>



<a name="156642753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156642753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156642753">(Jan 22 2019 at 21:48)</a>:</h4>
<p>FWIW another thing I’ve found out that <code>[T; N]</code> as passed by value is not actually representable in C currently.</p>



<a name="156642836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156642836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156642836">(Jan 22 2019 at 21:48)</a>:</h4>
<p>i.e. you cannot declare <code>fn foo(x: [u8; 128])</code> in C. At all.</p>



<a name="156642877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156642877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156642877">(Jan 22 2019 at 21:49)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> so -- basically we filter out zero-sized, repr-rust things only?</p>



<a name="156642904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156642904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156642904">(Jan 22 2019 at 21:49)</a>:</h4>
<p>and if you have e.g. a zero-sized C struct</p>



<a name="156642912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156642912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156642912">(Jan 22 2019 at 21:49)</a>:</h4>
<p>we still consider the resulting thing not homogeneous</p>



<a name="156642981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156642981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156642981">(Jan 22 2019 at 21:50)</a>:</h4>
<p>i.e.,</p>
<div class="codehilite"><pre><span></span><span class="cp">#[repr(C)]</span><span class="w"> </span><span class="k">struct</span> <span class="nc">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>

<span class="cp">#[repr(C)]</span><span class="w"> </span><span class="k">struct</span> <span class="nc">Bar</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">f</span>: <span class="nc">Foo</span><span class="p">,</span><span class="w"> </span><span class="n">x</span>: <span class="kt">u8</span><span class="p">,</span><span class="w"> </span><span class="n">y</span>: <span class="kt">u8</span> <span class="p">}</span><span class="w"> </span><span class="c1">// not homogeneous because `f`</span>
</pre></div>



<a name="156642990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156642990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156642990">(Jan 22 2019 at 21:50)</a>:</h4>
<p>but</p>



<a name="156643000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643000">(Jan 22 2019 at 21:50)</a>:</h4>
<p>I guess. I’m not entirely clear what behaviour really zero sized repr(C) should imply, because C does not allow declaring zero-sized structs AFAIK.</p>



<a name="156643012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643012">(Jan 22 2019 at 21:50)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">struct</span> <span class="nc">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>

<span class="cp">#[repr(C)]</span><span class="w"> </span><span class="k">struct</span> <span class="nc">Bar</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">f</span>: <span class="nc">Foo</span><span class="p">,</span><span class="w"> </span><span class="n">x</span>: <span class="kt">u8</span><span class="p">,</span><span class="w"> </span><span class="n">y</span>: <span class="kt">u8</span> <span class="p">}</span><span class="w"> </span><span class="c1">// homogeneous, because `Foo` is repr(rust)</span>
</pre></div>



<a name="156643017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643017">(Jan 22 2019 at 21:50)</a>:</h4>
<blockquote>
<p>I guess. I’m not entirely clear what behaviour really zero sized repr(C) should imply, because C does not allow declaring zero-sized structs AFAIK.</p>
</blockquote>
<p>clang and gcc support them via extension</p>



<a name="156643045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643045">(Jan 22 2019 at 21:51)</a>:</h4>
<p>(and they are filtered out when considered homogeneous aggregates, afaik)</p>



<a name="156643054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643054">(Jan 22 2019 at 21:51)</a>:</h4>
<p>however, I agree they are rare and weird</p>



<a name="156643061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643061">(Jan 22 2019 at 21:51)</a>:</h4>
<p>also, C++ and C differ</p>



<a name="156643068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643068">(Jan 22 2019 at 21:51)</a>:</h4>
<p>we've traditionally "sided" with C here though</p>



<a name="156643079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643079">(Jan 22 2019 at 21:51)</a>:</h4>
<p>okay, so in that case we should match that, I guess. Not sure how much we want to support C <em>extensions</em>.</p>



<a name="156643083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643083">(Jan 22 2019 at 21:51)</a>:</h4>
<p>(C++ excludes zero-sized things, recasting them as requiring at least one byte)</p>



<a name="156643095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643095">(Jan 22 2019 at 21:51)</a>:</h4>
<p>Indeed.</p>



<a name="156643157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643157">(Jan 22 2019 at 21:52)</a>:</h4>
<p>Still, I think if we're going to give it semantics, then matching gcc is good, presuming gcc is not doing something crazy.</p>



<a name="156643164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643164">(Jan 22 2019 at 21:52)</a>:</h4>
<p>The annoying thing is that we can't <em>not</em> give it semantics</p>



<a name="156643171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643171">(Jan 22 2019 at 21:52)</a>:</h4>
<p>i.e., we have to generate <em>some</em> code :)</p>



<a name="156643194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643194">(Jan 22 2019 at 21:52)</a>:</h4>
<p>but otoh I think it's kind of rare and we have room to change things here as long as we're sort of generally making more things work</p>



<a name="156643208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643208">(Jan 22 2019 at 21:52)</a>:</h4>
<p>(e.g., we're changing things <em>right now</em>)</p>



<a name="156643229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643229">(Jan 22 2019 at 21:53)</a>:</h4>
<p>anyway I'm definitely game to land a repr-rust-only PR to start</p>



<a name="156643235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643235">(Jan 22 2019 at 21:53)</a>:</h4>
<p>we can always expand to more cases</p>



<a name="156643250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643250">(Jan 22 2019 at 21:53)</a>:</h4>
<p>(it does seem like we need a way to declare "flexible array", though)</p>



<a name="156643263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643263">(Jan 22 2019 at 21:53)</a>:</h4>
<p>Absolutely. That pattern is very common in C code.</p>



<a name="156643446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643446">(Jan 22 2019 at 21:55)</a>:</h4>
<p>hmm, I guess filtering down to "just repr-rust" will be a bit trickier than I thought</p>



<a name="156643453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643453">(Jan 22 2019 at 21:56)</a>:</h4>
<p>I have to add some flags or something</p>



<a name="156643538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643538">(Jan 22 2019 at 21:56)</a>:</h4>
<p>basically something like the <code>has_vla</code> flag but simpler</p>



<a name="156643584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156643584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156643584">(Jan 22 2019 at 21:57)</a>:</h4>
<p>(because the code in question doesn't really know what <em>types</em> it is looking at)</p>



<a name="156863715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156863715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156863715">(Jan 25 2019 at 16:20)</a>:</h4>
<p>That PR ended up being very clean, <span class="user-mention" data-user-id="116009">@nikomatsakis</span>!</p>



<a name="156873734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/156873734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#156873734">(Jan 25 2019 at 18:44)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> yes, it came out nice -- in part because we did the simple thing :)</p>



<a name="158612041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/158612041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#158612041">(Feb 15 2019 at 12:57)</a>:</h4>
<p>Hey, <span class="user-mention" data-user-id="116009">@nikomatsakis</span> , can I get a quick clarification about a <a href="https://github.com/rust-lang/rust/pull/57645/files#diff-3a730665c4c7b9d276f4566c9d1fa832R3" target="_blank" title="https://github.com/rust-lang/rust/pull/57645/files#diff-3a730665c4c7b9d276f4566c9d1fa832R3">comment</a> in a test from that PR ?</p>



<a name="158612108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/158612108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#158612108">(Feb 15 2019 at 12:58)</a>:</h4>
<p>in particular, I am trying to figure out the intent of the word "ignore" in "Show that <code>homogeneous_aggregate</code> code ignores zero-length arrays."</p>



<a name="158612143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/158612143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#158612143">(Feb 15 2019 at 12:59)</a>:</h4>
<p>I had thought the intent was that a zero-length array field would <em>not</em> be filtered out, at least not yet, in the homogenous aggregate check. And from what I can tell, that test is encoding my expectation.</p>



<a name="158612171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/158612171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#158612171">(Feb 15 2019 at 12:59)</a>:</h4>
<p>oh, wait, no, that test is not encoding my expectation</p>



<a name="158612243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/158612243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#158612243">(Feb 15 2019 at 13:00)</a>:</h4>
<p>(I misunderstood because the test embeds an "error message", but that is just an artifact of how we are exposing the layout for the test via <code>#[rustc_layout(..)]</code></p>



<a name="158612290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/158612290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#158612290">(Feb 15 2019 at 13:01)</a>:</h4>
<p>Okay so now after re-reading the comment thread on PR <a href="https://github.com/rust-lang/rust/issues/56877" target="_blank" title="https://github.com/rust-lang/rust/issues/56877">#56877</a> I guess you <em>did</em> settle on filtering out all ZSTs, not just the Rust ones.</p>



<a name="158612708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/158612708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#158612708">(Feb 15 2019 at 13:09)</a>:</h4>
<p>(posted summary of my understanding in the description of newly filed issue <a href="https://github.com/rust-lang/rust/issues/58487" target="_blank" title="https://github.com/rust-lang/rust/issues/58487">#58487</a> )</p>



<a name="158638659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/158638659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#158638659">(Feb 15 2019 at 18:49)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> yes, this changed back and forth a few times so I can't blame you for being confused. But in my last conversation with <span class="user-mention" data-user-id="119009">@eddyb</span> we settled on "just screen out ZSTs"</p>



<a name="158639472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/158639472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#158639472">(Feb 15 2019 at 18:59)</a>:</h4>
<p>yay zulip only took half a minute to get me here</p>



<a name="158639637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/reviewer%20wanted%20for%20abi%20aggregates%20PR/near/158639637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/reviewer.20wanted.20for.20abi.20aggregates.20PR.html#158639637">(Feb 15 2019 at 19:01)</a>:</h4>
<p>yeah the ZST case where it's <code>T data[];</code> at the end of a struct is unrepresentable in Rust, and that doesn't make much sense for by-value passing anyway, so we should be free to ignore ZSTs</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>